﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using LtccApi.Models;
using Microsoft.AspNetCore.Mvc;

namespace LtccApi.Controllers
{
    /// <summary>
    /// 卡车店铺轮胎
    /// </summary>
    [Route("api/[Controller]")]
    [ApiController]
    public class StoreTruckTireController : Controller
    {
        private LtccContext mLtccContext;

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="ltccContext"></param>
        public StoreTruckTireController(LtccContext ltccContext)
        {
            mLtccContext = ltccContext;
        }

        /// <summary>
        /// 卡车店铺轮胎
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public IActionResult List()
        {
            List<StoreTire> listData = mLtccContext.StoreTires.Where(m => m.TruckFlag == 1).Skip(50).Take(50).ToList();
            return Ok(listData);
        }
    }
}